


#ifndef MUTATOR_H
#define MUTATOR_H



#include "subject.h"
#include "category.h"



class Mutator : public IMutable
{
public:        
    Mutator( CollectionSubjects *subs, CollectionCategories *cats );
    virtual ~Mutator();

    bool check();
    
    virtual bool isLikeInitial() const;
    virtual bool mutate();
    virtual void restore();
    
protected:    
    CollectionSubjects *m_pSubjects;
    CollectionCategories *m_pCategories;
};



class DoorMutator : public Mutator
{
public:
    DoorMutator( CollectionSubjects *subs, CollectionCategories *cats );
    virtual bool mutate();
    
protected:
    bool m_bSignsMutated;
};



class PeopleMutator : public Mutator
{
public:
    PeopleMutator( CollectionSubjects *subs, CollectionCategories *cats );
    virtual bool mutate();
    virtual void restore();
    
protected:
    uint8_t m_nNameStage;
    uint8_t m_nNameStages;
};



class GlobalMutator : public IMutable
{
public:
    GlobalMutator( CollectionSubjects *doors, CollectionCategories *catdoors, CollectionSubjects *people, CollectionCategories *catpeople );
    bool check();
    
    virtual bool isLikeInitial() const;
    virtual bool mutate();
    virtual void restore();
    
protected:
    DoorMutator m_DoorMutator;
    PeopleMutator m_PeopleMutator;
};



#endif
